package org.stvd.common.security.support;

import org.springframework.security.core.userdetails.UserDetails;
import org.stvd.core.util.DateUtil;

public class SaltSourceEx implements org.springframework.security.authentication.dao.SaltSource {

    @Override
    public Object getSalt(UserDetails user) {
        UserDetail userDetail = (UserDetail) user;
        return userDetail.getUsername() + DateUtil.Y2NO_FORMAT.format(userDetail.getUsers().getIndate());
    }

}
